<template>
  <v-layout row>
    <v-flex xs12 style="text-align: center;">
        <v-toolbar color="indigo" dark>
          <v-btn icon @click.native="close">
            <v-icon>close</v-icon>
          </v-btn>
          <v-toolbar-title style="color:#fff;font-weight: bold;">错误页面</v-toolbar-title>
          <v-spacer></v-spacer>
          <v-btn icon @click="logout">
            <v-icon>power_settings_new</v-icon>
          </v-btn>
        </v-toolbar>
      <v-card-text><span style="font-size:64px;font-weight: bold;color:gray;">{{errorCode}}</span></v-card-text>
      <v-card-text><h1 style="color:red;">{{errorInfo}}</h1></v-card-text>
      <v-card-text><img class="logo" src="/static/401.gif" alt="avatar"></v-card-text>
    </v-flex>
  </v-layout>
</template>

<script>
import router from '../../router/index'
import { mapActions } from 'vuex'
export default {
  name: 'error',
  data: function () {
    return this.$store.state.frame.data
  },
  methods: {
    close () {
      router.go(-1)
    },
    ...mapActions({
      logout: 'logout'
    })
  }
}
</script>
